package com.dada.controller;

import com.alibaba.fastjson.JSON;
import com.dada.domain.Admin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by jianweilin on 16/9/17.
 */
@RestController
@RequestMapping(value = "/admin")
public class AdminController {
    @RequestMapping(value = "/info",method = RequestMethod.GET)
    public String info(@RequestParam String username, @RequestParam String password){
        return JSON.toJSONString(new Admin(username,password));
    }
}
